package com.seal.tsms.system.entity;

import javax.persistence.*;
import java.io.Serializable;

/**
 * Created by seal.jing on 2016/1/2.
 */
@Entity
@Table(name = "SYS_USER_ROLE")
@IdClass(UserRolePk.class)
public class UserRole implements Serializable{
    @Id
    @ManyToOne()
    @JoinColumn(name = "USER_ID")
    private SystemUser user;
    @Id
    @ManyToOne()
    @JoinColumn(name = "ROLE_ID")
    private SystemRole role;

    public SystemUser getUser() {
        return user;
    }

    public void setUser(SystemUser user) {
        this.user = user;
    }

    public SystemRole getRole() {
        return role;
    }

    public void setRole(SystemRole role) {
        this.role = role;
    }
}
